const state = {
  isCollapse: JSON.parse(sessionStorage.getItem("isCollapse")) || false
};

const mutations = {
  SET_COLLAPSE(state) {
    state.isCollapse = !state.isCollapse;

    //本地存储切换后的状态，保持当前的页面显示布局
    sessionStorage.setItem("isCollapse", JSON.stringify(state.isCollapse));
  }
};

export default {
  namespaced: true,
  state,
  mutations
};
